<?php
function reequipment_adminapi_updatefrequency($args)
{
    // Get arguments from argument array
    extract($args);

    // Get datbase setup
    $dbconn =& xarDBGetConn();
    $xartable =& xarDBGetTables();
    $table = $xartable['refrequency'];

    $update = array();
    $bindvars = array();

    // Update item
    $query = "UPDATE $table SET ";
    if (isset($frequency_id)){
        $update[] = "frequency_id = ? ";
        $bindvars[] = $frequency_id;
    }
    if (isset($frequency)){
        $update[] = "frequency = ? ";
        $bindvars[] = $frequency;
    }
    $query .= join(",",$update);
    $query .= "WHERE frequency_id = ? ";
    $bindvars[] = $frequency_id;
    $result =& $dbconn->Execute($query, $bindvars);
    if (!$result) return;
    return true;
}
?>